<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        background-color: #333;
      }
      .square {
        width: 50vw;
        height: 50vh;
        background-color: #fff;
      }

      .wrap {
        margin-top: 20px;
        width: 100px;
        height: 100px;

        .square2 {
          width: inherit;
          height: inherit;
          background-color: #fff;
        }
      }
    </style>
  </head>
  <body>
    <div class="square"></div>

    <div class="wrap">
      <div class="square2"></div>
    </div>
  </body>
</html>
